<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>KKd的博客</title>
    <%--引入头文件--%>
    <%@include file="../common/head.jsp"%>

    <script type="text/javascript">
        $(function () {
            /*引入ajax*/
            <%@include file="../common/searchAjax.jsp"%>
            /*引入ajax*/
            $("#setFChain").click(function () {
                return confirm("确认要置顶消息吗？");
            });
            /*前端似乎不能转化*/
            /*$("#titleConvert").click(function () {
                console.log($(this).attr("href").val());
                return filter($(this).attr("href").val());
            })*/
        })
        //这里是前面转化的函数
        /*function filter(str) {
            if (str!=null){
                str=str.replace(/\+/g,"%2B");
                str = str.replace(/\&/g,"%26");
                return str;
            }
        }*/
        <%@include file="../common/showCata.jsp"%>
    </script>

</head>
<body class="pic-bg">
<div class="container-fluid">
    <%--头页面--%>
    <%@include file="../common/headPage.jsp"%>
    <%--头页面--%>
    <div class="row-fluid clearfix">
        <%--输出的主要页面信息--%>
        <div class="col-md-9 displayTextBg" style="border-top:5px solid #000000;border-left:5px solid #dedede;height:750px;overflow:auto;">
            <c:if test="${blogs!=null}">
                <c:forEach items="${blogs}" var="blog" >
                    <h3 style="color: white">
                            <a style="color: white" href="${pageContext.request.contextPath}/blog/toBlog?title=${blog.title}">${blog.title}</a>
                    </h3>
                    <li style="color: white">
                        <a style="color: white" href="${pageContext.request.contextPath}/blog/toBlog?title=${blog.title}">${blog.comment}...</a>
                    </li>
                    <li>
                        <%--<script>
                            filter(${blog.title});
                        </script>--%>
                        <a class="textDivBg" href="${pageContext.request.contextPath}/blog/toBlog?title=${blog.title}">查看详情</a>
                    </li>
                </c:forEach>
                <h3 style="color: white" class="text-center">-----------已经到底啦-----------</h3>
            </c:if>
        </div>
            <%--右侧页面信息--%>
            <%@include file="../common/rightPage.jsp"%>
            <%--右侧页面信息--%>
    </div>
</div>
</body>
</html>